package com.jlcindia;

public class OopsTest41 {
	public static void main(String[] args) {
		Hai41 ref=new Hai41();
		System.out.println(ref.data);
		ref.data=90;
		boolean b1=ref.msg;
		System.out.println(b1);
		System.out.println(ref.data);
		//dynamic dispatch
		Hello41 h=new Hai41();
		System.out.println("*****");
		System.out.println(h.data);
		//System.out.println(h.msg);
		h.data="OK";
		//h.data=234;
		System.out.println(h.data);
		
	}

}
class Hello41{
	String data;
}
class Hai41 extends Hello41{
	int data;
	boolean msg;
}